package com.wk.springboot.aop;


import org.xhy.aop.annotation.*;
import org.xhy.aop.core.JoinPoint;
import org.xhy.aop.core.ProceedingJoinPoint;

@Aop(jointPath="com.wk.springboot.service.*")
public class CustomAopConfig {

    @Before
    public void before(JoinPoint joinPoint){
        System.out.println("before");
    }

    @Throwing
    public void throwing(JoinPoint joinPoint){
        System.out.println("throwing");
    }
    @After
    public void after(JoinPoint joinPoint){
        System.out.println("after");
    }

    @Around
    public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
        return joinPoint.invoke();
    }

}
